from typing import *


class Solution:

    def evalRPN(self, tokens: List[str]) -> int:
        s = []
        for t in tokens:
            if t == '+':
                a, b = s.pop(), s.pop()
                s.append(a + b)
            elif t == '-':
                a, b = s.pop(), s.pop()
                s.append(b - a)
            elif t == '*':
                a, b = s.pop(), s.pop()
                s.append(a * b)
            elif t == '/':
                a, b = s.pop(), s.pop()
                s.append(int(b / a))
            else:
                s.append(int(t))
            print(s)
        return s.pop()


s = Solution()
print(
    s.evalRPN(
        ["10", "6", "9", "3", "+", "-11", "*", "/", "*", "17", "+", "5", "+"]))
print(6 // -132)
print(9 % -4)
print(int(6 / -132))
print(int(9 % -4))

print(divmod(9,-4))
